var myApp = angular.module ('fs.waf');
myApp.controller ('testController', [
  '$scope',
  '$http',
  function ($scope, $http) {
    // $http.get ('./config.json/1.json').then (
    //   function successCallback (response) {
    //     console.log (response);
    //   },
    //   function errorCallback (response) {
    //     // 请求失败执行代码
    //     console.log (response);
    //   }
    // );

    $scope.jack = {
      name: 'jack',
      age: 18,
    };

    $scope.tt = '我是tt';

    $scope.parentFunction = function (msg) {
      // alert (123);
      // console.log (123131312);
      alert (msg);
    };

    $scope.click = function (msg) {
      $scope.value = Math.random ();
      console.log ($scope.value);
      console.log (msg);
    };

    $scope.btnConfig = {
      name: 'buttonGroup',
      groupClass: 'panel-btn-group',
      buttons: [
        {
          name: 'save',
          label: 'button.text.save',
          type: 'button',
          options: {
            icon: 'save',
            hotKey: 'alt+s',
            callback: {
              click: 'vm.createSave',
            },
          },
          // uppercase: true,
          // permission: '*',
        },
        {
          name: 'save',
          label: 'button.text.save',
          type: 'button',
          options: {
            icon: 'save',
            hotKey: 'alt+s',
            callback: {
              click: 'vm.createSave',
            },
          },
          // uppercase: true,
          // permission: '*',
        },
      ],
    };

    $scope.fsGriudLayout = {
      gridGroups: [
        {
          name: 'group',
          grids: ['companyClass', 'companyClassName', 'companyClassDesc'],
        },
      ],
      gridConfigs: {
        companyClassName: {
          name: 'companyClassName',
          label: 'label.companyclass.companyclassname',
          model: 'companyClassName',
          type: 'password',
          size: 7,
          filter: 'encode',
          options: {
            callback: {
              changed: 'vm.setComClassCode',
            },
          },
          placeholder: 'placeholder.companyclass.companyclassname',
          tooltip: 'tooltip.companyclass.companyclassname',
          help: 'help.companyclass.companyclassname',
          uppercase: true,
        },
      },
    };
  },
]);
